package com.xiaocg.common;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author xiaocg
 */
@RestControllerAdvice
public class GlobalExceptionAdvice {

    @ExceptionHandler(Exception.class)
    public ResData doException(Exception ex){
        ex.printStackTrace();
        return new ResData(0,"服务器异常，请稍后再试",null);
    }
}
